<form name="schedule_search" method="post" action="index.php?page=schedule" >

<input type="hidden" name="sched_show_fri"  value="0" />
<input type="hidden" name="sched_show_sat"  value="0" />
<input type="hidden" name="sched_show_sun"  value="0" />
<input type="hidden" name="sched_show_u10"  value="0" />
<input type="hidden" name="sched_show_u12"  value="0" />
<input type="hidden" name="sched_show_u14"  value="0" />
<input type="hidden" name="sched_show_u16"  value="0" />
<input type="hidden" name="sched_show_u19"  value="0" />
<input type="hidden" name="sched_show_coed" value="0" />
<input type="hidden" name="sched_show_girl" value="0" />

<table border="1" width="800">
<tr><th colspan="3">Schedule Search Form</th></tr>
<tr>
	<td>Show</td>
	<td>
	  <table border = "1">
	  <tr>
	  	<td>Fri</td>
	  	<td>Sat</td>
	  	<td>Sun</td>	  	
	  	<td width="10">&nbsp;</td>	  	
	  	<td>U10</td>	  	
	  	<td>U12</td>	  
	  	<td>U14</td>	  	
	  	<td>U16</td>	  
	  	<td>U19</td>	  	
	  	<td width="10">&nbsp;</td>
	  	<td>Coed</td>
	  	<td>Girl</td>	  
	  </tr>
	  <tr>
      	<td><?php echo $this->formCheckBox('sched_show_fri', $tpl->showFri); ?></td>
      	<td><?php echo $this->formCheckBox('sched_show_sat', $tpl->showSat); ?></td>
      	<td><?php echo $this->formCheckBox('sched_show_sun', $tpl->showSun); ?></td>
		<td>.</td>
      	<td><?php echo $this->formCheckBox('sched_show_u10', $tpl->showU10); ?></td>
      	<td><?php echo $this->formCheckBox('sched_show_u12', $tpl->showU12); ?></td>
      	<td><?php echo $this->formCheckBox('sched_show_u14', $tpl->showU14); ?></td>
      	<td><?php echo $this->formCheckBox('sched_show_u16', $tpl->showU16); ?></td>
      	<td><?php echo $this->formCheckBox('sched_show_u19', $tpl->showU19); ?></td>
		<td>.</td>
      	<td><?php echo $this->formCheckBox('sched_show_coed',$tpl->showCoed);?></td>
      	<td><?php echo $this->formCheckBox('sched_show_girl',$tpl->showGirl);?></td>
	  </tr>
      </table>
    </td>
    <td>
      <table>
        <tr>
          <td>Sort By</td>
          <td>
            <select name="sched_sort">
			  <?php echo $this->formOptions($tpl->sortPickList,$tpl->sort); ?>
		    </select>
          </td>
        </tr>
        <tr>
          <td>Game Search</td>
          <td>
            <input type="text" name="sched_search_game" size="20" 
                   value="<?php echo $this->escape($tpl->searchGame); ?>" />
          </td>
        </tr>
        <tr>
          <td>Ref Search</td>
          <td>
            <input type="text" name="sched_search_ref" size="20" 
                   value="<?php echo $this->escape($tpl->searchRef); ?>" />
          </td>
        </tr>
      </table>
    </td>
</tr>
<tr>
	<td colspan="2">
	User: <?php echo $tpl->userName; ?> 
	<a href="index.php">Logout</a>
	<a href="index.php?page=schedule&out=excel">Excel</a>
	</td>
	<td align="right">
		<input type="submit" name="submit" value="Update List of Games"/>
	</td>
</tr>
<tr>
	<td colspan="3">
	<span style="background-color: red">Online signup is disable, please email or call to signup.</span><br />
	Signup for games by clicking on one of the referee links in the right hand column.
	If you don't see any links then make sure you are logged in with the correct password.<br />
	Green referee names are pending approval, Black means approved.  
	Red means the referee really does not want to do the game so feel free to take the assignment.
	Brown are the ones either assigned or changed by me.<br />
	Fields: <a href="http://ayso160.clubspaces.com/PageCustom.aspx?id=4&o=19897">JH = John Hunt Park, MM = Merrimack Park.</a><br />
	Contact me if you need to remove yourself from a game or you want a slot that has already been taken.<br>
	For help: Contact <a href="mailto:ahundiak@gmail.com">Art Hundiak</a>. Phone: 256.457.5943
	</td>
</tr>
</table>
</form>
<br />
<table border = "1" width="800">
<tr><th colspan="8">Game and Referee Schedule</th></tr>
<tr>
	<td width="45">Game</td>
	<td width="45">Date</td>
	<td width="45">Time</td>
	<td width="50">Field</td>
	<td width="40">Div</td>
	<td width="60">Bracket</td>
	<td width="160">Home/Away Team</td>
	<td width="250">Referees</td>
</tr>
<?php 
	foreach($tpl->games as $game)
	{
		switch($game->id)
		{
			case 95: case 132: case 14: case 53:
				$style = 'style="background-color: red"';
				break;
			default:
				$style = NULL;
		}
?>
<tr <?php echo $style; ?>>
	<td align="center"><?php echo $game->id;     ?></td>
	<td><?php echo $game->date;    ?></td>
	<td><?php echo $game->time;    ?></td>
	<td><?php echo $game->field;   ?></td>
	<td><?php echo $game->div;     ?></td>
	<td><?php echo $this->displayBracket($game); ?></td>
	<td><?php echo $this->displayTeams  ($game); ?></td>
	<td><?php echo $this->displayPersons($game); ?></td>
</tr>
<?php } ?>
</table>